package com.xsd.Factory.absFactory.pizzastore.order;

import com.xsd.Factory.absFactory.pizzastore.pizza.BJCheesePizza;
import com.xsd.Factory.absFactory.pizzastore.pizza.BJPepperPizza;
import com.xsd.Factory.absFactory.pizzastore.pizza.Pizza;

/**
 * @Description:
 * @Author: zhoufuzong
 * @Created: 2021-01-23 18:54:51
 * @Version: 1.1.0
 */

// 这是工厂之类
public class BJFactory  implements AbsFactory{

    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza =null;
        if (orderType.equals("cheese")){
            pizza = new BJCheesePizza();
        }else if (orderType.equals("pepper")){
            pizza =new BJPepperPizza();
        }

        return pizza;

    }
}
